/**
 * Created by hxb on 2017/3/7.
 */
import * as types from '../types'

const state = {
  type: false,
  sysqq: '',
  url: '',
  logo: '',
  addressLuckType: false,
  isPointBuy: 0
}

const mutations = {
  [types.EMPOWER] (state, data) {
    if (undefined !== data.isPointBuy) {
      state.isPointBuy = data.isPointBuy
    }
    if (undefined !== data.addressLuckType) {
      state.addressLuckType = data.addressLuckType
    }
    if (undefined !== data.type) {
      state.type = data.type
    }
    if (undefined !== data.sysqq) {
      state.sysqq = data.sysqq
    }
    if (undefined !== data.url) {
      state.url = data.url
    }
    if (undefined !== data.logo) {
      state.logo = data.logo
    }
  }
}

export default {
  state,
  mutations
}
